﻿@model Car

@{
    ViewData["Title"] = "Edit";
}

@if (ViewData["Error"] != null)
{
    <div class="alert alert-danger" role="alert">
        @ViewData["Error"]
    </div>
}
else
{
    <h1>Edit @Model.PetName</h1>
    <hr/>
    <form asp-area="" asp-controller="Cars" asp-action="Edit" asp-route-id="@Model.Id">
        <div class="row">
            <div class="col-md-4">
                @Html.EditorForModel()
            </div>
        </div>
        <div class="d-flex flex-row mt-3">
            <input type="hidden" asp-for="Id"/>
            <input type="hidden" asp-for="TimeStamp"/>
            <button type="submit" class="btn btn-primary">Save <i class="fas fa-save"></i></button>&nbsp;&nbsp;|&nbsp;&nbsp;
            <item-list></item-list>
        </div>
    </form>
}

@section Scripts {
    <partial name="_ValidationScriptsPartial"/>
}